package com.wl.common.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wl.common.mybatis.model.AbstractBaseDeleteModel;
import com.wl.common.core.constant.ConstantSystem;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * @author: wanglin
 * @date: 2023-09-13 周三
 * @Version: 1.0
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity(name = SysUserRole.TABLE_NAME)
@Table(appliesTo = SysUserRole.TABLE_NAME, comment = "用户角色表")
@TableName(value = SysUserRole.TABLE_NAME)
public class SysUserRole extends AbstractBaseDeleteModel {
    public static final String TABLE_NAME = ConstantSystem.TABLE_PREFIX + "user_role";
    @Column(columnDefinition = "varchar(32) comment '用户id'")
    private String userId;
    @Column(columnDefinition = "varchar(200) comment '角色id'")
    private String roleId;

    public SysUserRole() {
    }

    public SysUserRole(String userId, String roleId) {
        this.userId = userId;
        this.roleId = roleId;
    }
}
